home *** CD-ROM | disk | FTP | other *** search
/ Apple II Magazines (PO) / Nibble Volume 10, No. 07 (1989-07)(MindCraft Publishing)(Side A)[a].zip / Nibble Volume 10, No. 07 (1989-07)(MindCraft Publishing)(Side A)[a].po / SYS.DEV.ASM.txt < prev    next >
Text File  |  1996-12-24  |  25KB  |  710 lines

  1. ****************************************
  2. *                                      *
  3. *          System Devices NDA          *
  4. *     APW Assembler Source Listing     *
  5. *          by  Sandy Mossberg          *
  6. *                                      *
  7. *          Copyright (C) 1989          *
  8. *          by MicroSPARC, Inc.         *
  9. *          Concord, MA  01742          *
  10. *                                      *
  11. ****************************************
  12.             mcopy    sys.dev.mac     ;macro file
  13.             keep     sys.dev         ;convert to NDA with FILETYPE command
  14.  
  15. *****************************************************************
  16. *
  17. NDA_Header  start
  18. *
  19. * NDA header:
  20. *
  21. *****************************************************************
  22.  
  23.             dc       i4'NDA_Open'          ;ptr to open routine
  24.             dc       i4'NDA_Close'         ;ptr to close routine
  25.             dc       i4'NDA_Action'        ;ptr to action routine
  26.             dc       i4'NDA_Init'          ;ptr to initialization routine
  27.             dc       i2'60'                ;period: run every 1 second
  28.             dc       i2'%1111111111010111' ;event mask: ignore key-down events
  29.             dc       c'--'                 ;place-holders (length)
  30.             dc       c'System Devices\'    ;text of name + name terminator
  31.             dc       c'H--'                ;place-holders (menu ID)
  32.             dc       i1'0'                 ;end of name byte
  33.             end
  34.  
  35. *****************************************************************
  36. *
  37. NDA_Open    start
  38. *
  39. * Open NDA if it is closed:
  40. *
  41. * Entry: 1-3,s = return address; 4,s = B-reg; 5-8,s = space for window pointer.
  42. *
  43. * Exit: 1-4,s = window pointer.
  44. *
  45. *****************************************************************
  46.             using    Globals
  47.  
  48.             phb                      ;save entry data bank
  49.             phk                      ;equate data bank to program bank
  50.             plb
  51.  
  52.             lda      OpenFlag
  53.             bne      Done            ;NDA already open so exit
  54.  
  55.             jsr      GetDevices      ;create tables of devices/descriptions
  56.             jsr      SetWindSize     ;customize window size
  57.  
  58.             PushLong #0              ;create NDA window
  59.             PushLong #WindowRec
  60.             _NewWindow
  61.  
  62.             plx                      ;save ptr to NDA window's GrafPort
  63.             pla
  64.             stx      WindowPtr
  65.             sta      WindowPtr+2
  66.  
  67.             sta      7,s             ;put window ptr on stack for Desk
  68.             txa                      ; Manager after PLB and RTL
  69.             sta      5,s             ; instructions executed
  70.  
  71.             PushLong WindowPtr       ;mark NDA window as system window
  72.             _SetSysWindow
  73.  
  74.             lda      #-1             ;signal that NDA is open
  75.             sta      OpenFlag
  76.  
  77. Done        plb                      ;restore entry data bank
  78.             rtl
  79.             end
  80.  
  81. *****************************************************************
  82. *
  83. NDA_Init    start
  84. *
  85. * Initialize NDA startup and shutdown:
  86. *
  87. * Entry: A = zero = DeskShutDown; A = nonzero = DeskStartUp.
  88. *
  89. *****************************************************************
  90.  
  91.             tax                      ;test A-reg
  92.             beq      NDA_Close       ;close NDA
  93.             rtl                      ;opening NDA requires no action
  94.             end
  95.  
  96. *****************************************************************
  97. *
  98. NDA_Close   start
  99. *
  100. * Close NDA if it is open:
  101. *
  102. *****************************************************************
  103.             using    Globals
  104.  
  105.             phb                      ;save entry data bank
  106.             phk                      ;equate data bank to program bank
  107.             plb
  108.  
  109.             lda      OpenFlag
  110.             beq      Done            ;NDA already closed
  111.  
  112.             PushLong WindowPtr       ;close NDA window
  113.             _CloseWindow
  114.  
  115.             stz      OpenFlag        ;signal that NDA is closed
  116.  
  117. Done        plb                      ;restore entry data bank
  118.             rtl
  119.             end
  120.  
  121. *****************************************************************
  122. *
  123. NDA_Action  start
  124. *
  125. * Handle the designated action:
  126. *
  127. * Entry: A = action code; X,Y = pointer to event record or menu IDs.
  128. *
  129. *****************************************************************
  130.  
  131.             phb                      ;save entry data bank
  132.             phy                      ;save ptr to event record or menu IDs
  133.             phx
  134.             phk                      ;equate data bank to program bank
  135.             plb
  136.  
  137.             asl      a               ;index table of 2-byte entries
  138.             tax
  139.             jsr      (ActionTable,x) ;perform action
  140.  
  141.             plx                      ;restore ptr to event record or menu IDs
  142.             ply
  143.             plb                      ;restore entry data bank
  144.             rtl
  145. ;................................................................
  146. ;
  147. ; NDA_Action data:
  148. ;
  149. ActionTable anop                     ;action table
  150.             dc       i2'DoNothing'   ;0 = no action
  151.             dc       i2'DoEvent'     ;1 = event action
  152.             dc       i2'DoRun'       ;2 = run action
  153.             dc       i2'DoNothing'   ;3 = cursor action
  154.             dc       i2'DoNothing'   ;4 = menu action
  155.             dc       i2'DoNoEdit'    ;5 = undo action
  156.             dc       i2'DoNoEdit'    ;6 = cut action
  157.             dc       i2'DoNoEdit'    ;7 = copy action
  158.             dc       i2'DoNoEdit'    ;8 = paste action
  159.             dc       i2'DoNoEdit'    ;9 = clear action
  160.             end
  161.  
  162. *****************************************************************
  163. *
  164. DoNoEdit     start
  165. *
  166. * Take no edit action but pretend you did:
  167. *
  168. *****************************************************************
  169.  
  170.             lda      #-1             ;signal that action handled
  171.  
  172. DoNothing   entry                    ;just do nothing
  173.  
  174.             rts
  175.             end
  176.  
  177. *****************************************************************
  178. *
  179. DoRun       start
  180. *
  181. * Perform display action when time period has expired:
  182. *
  183. *****************************************************************
  184.             using    Globals
  185.  
  186.             PushLong #0              ;save entry GrafPort on stack
  187.             _GetPort
  188.  
  189.             PushLong WindowPtr       ;activate NDA GrafPort
  190.             _SetPort
  191.  
  192.             jsr      ShowDevices     ;display device names and descriptions
  193.  
  194.             _SetPort                 ;restore entry GrafPort
  195.             rts
  196.             end
  197.  
  198. *****************************************************************
  199. *
  200. DoEvent     start
  201. *
  202. * Handle event action:
  203. *
  204. * Entry: 5,s = pointer to event record.
  205. *
  206. *****************************************************************
  207.             using    Globals
  208.  
  209. What        equ      $05             ;location of ptr to event record
  210.  
  211.             phd                      ;save entry direct page
  212.             tsc                      ;align direct page with stack
  213.             tcd
  214.  
  215.             lda      [What]          ;get "what" code of event record
  216.             cmp      #9
  217.             bcs      Done            ;unsupported code found
  218.  
  219.             asl      a               ;index table of 2-byte entries
  220.             tax
  221.             jsr      (EventTable,x)  ;handle event
  222.  
  223. Done        pld                      ;restore entry direct page
  224.             rts
  225. ;................................................................
  226. ;
  227. ; DoEvent data:
  228. ;
  229. EventTable  anop                     ;event table
  230.             dc       i2'DoNothing'   ;0 = null event
  231.             dc       i2'DoNothing'   ;1 = mouse-down event
  232.             dc       i2'DoNothing'   ;2 = mouse-up event
  233.             dc       i2'DoNothing'   ;3 = key-down event
  234.             dc       i2'DoNothing'   ;4 = reserved event
  235.             dc       i2'DoNothing'   ;5 = auto-key event
  236.             dc       i2'DoUpdate'    ;6 = window update event
  237.             dc       i2'DoNothing'   ;7 = reserved event
  238.             dc       i2'DoNothing'   ;8 = window activate event
  239.             end
  240.  
  241. *****************************************************************
  242. *
  243. DoUpdate    start
  244. *
  245. * Update NDA window:
  246. *
  247. *****************************************************************
  248.             using    Globals
  249.  
  250.             PushLong WindowPtr
  251.             _BeginUpdate
  252.  
  253.             jsr      ShowDevices
  254.  
  255.             PushLong WindowPtr
  256.             _EndUpdate
  257.  
  258.             rts
  259.             end
  260.  
  261. *****************************************************************
  262. *
  263. GetDevices  start
  264. *
  265. * Create table of device names and table of pathnames/descriptions:
  266. *
  267. *****************************************************************
  268.             using    Globals
  269.  
  270. Ptr         equ      $00             ;temporary ptr
  271.  
  272.             stz      devNum          ;prepare for sequential device numbers
  273. GD01        lda      devNum          ;create index to device name table
  274.             asl      a               ; and device info table
  275.             asl      a
  276.             asl      a
  277.             asl      a
  278.             asl      a
  279.             sta      TableIndex
  280.  
  281.             inc      devNum          ;bump device number
  282.             lda      devNum          ;allow no more than 16 devices
  283.             cmp      #17
  284.             bcs      GD02
  285.  
  286.             _DInfoGS DInfoParm       ;get device info
  287.             bcc      GD03            ;no error
  288. GD02        brl      Done            ;finished with device list
  289.  
  290. GD03        lda      devNameStr      ;convert GS/OS string at devNameStr
  291.             xba                      ; to P-string at devNameStr+1
  292.             sta      devNameStr
  293.  
  294.             PushLong #devNameStr+1   ;copy name string to device name table
  295.             ldx      #^DevNameTbl
  296.             clc
  297.             lda      #DevNameTbl
  298.             adc      TableIndex
  299.             bcc      GD04
  300.             inx
  301. GD04        phx
  302.             pha
  303.             PushWord #0
  304.             lda      devNameStr+1
  305.             and      #$FF
  306.             inc      a
  307.             pha
  308.             _BlockMove
  309.  
  310.             lda      charistics      ;get device characteristics
  311.             and      #$0080          ;isolate block device bit
  312.             beq      GD08            ;device not a block device
  313.  
  314.             lda      devNameStr      ;convert P-string at devNameStr+1
  315.             xba                      ; to GS/OS string at devNameStr
  316.             sta      devNameStr      ; for class 1 GS/OS call
  317.  
  318.             _VolumeGS VolumeParm     ;get volume info
  319.             bcc      GD05            ;no error
  320.  
  321.             PushLong #NoVolStr       ;copy [volume not found] to
  322.             lda      NoVolStr        ; device info table
  323.             bra      GD06
  324.  
  325. GD05        lda      volNameStr      ;convert GS/OS string at volNameStr
  326.             xba                      ; to P-string at volNameStr+1
  327.             sta      volNameStr
  328.  
  329.             shortm                   ;change semicolon separator
  330.             lda      #'/'            ; to slash separator
  331.             sta      volNameStr+2
  332.             longm
  333.  
  334.             PushLong #volNameStr+1   ;copy volume name string to
  335.             lda      VolNameStr+1    ; device info table
  336. GD06        and      #$FF
  337.             inc      a
  338.             sta      StrLen
  339.             ldx      #^DevInfoTbl
  340.             clc
  341.             lda      #DevInfoTbl
  342.             adc      TableIndex
  343.             bcc      GD07
  344.             inx
  345. GD07        phx
  346.             pha
  347.             PushLong StrLen
  348.             _BlockMove
  349.             brl      GD01            ;loop back for another device
  350.  
  351. GD08        lda      Ptr             ;copy device ID string to
  352.             sta      DPSave          ; device info table
  353.             lda      Ptr+2
  354.             sta      DPSave+2
  355.             lda      devID
  356.             asl      a
  357.             asl      a
  358.             tax
  359.             lda      DevIDPtrTbl+2,x
  360.             pha
  361.             sta      Ptr+2
  362.             lda      DevIDPtrTbl,x
  363.             pha
  364.             sta      Ptr
  365.             lda      [Ptr]
  366.             tax
  367.             lda      DPSave
  368.             sta      Ptr
  369.             lda      DPSave+2
  370.             sta      Ptr+2
  371.             txa
  372.             bra      GD06
  373.  
  374. Done        ldx      TableIndex      ;zero length bytes signals
  375.             stz      DevNameTbl,x    ; end of table entries
  376.             rts
  377. ;................................................................
  378. ;
  379. ; GetDevices data:
  380. ;
  381. DPSave      ds       4               ;save area for direct page data
  382. TableIndex  ds       2               ;index to device name/info tables
  383. StrLen      ds       4               ;number of bytes in target string
  384.  
  385. NoVolStr    str      '[ Volume not found ]'
  386.  
  387. DevIDTxtTbl anop                     ;table of device ID number definitions
  388. ID00        str      '[ Apple 5.25 drive ]'
  389. ID01        str      '[ Profile 5 MB hard drive ]'
  390. ID02        str      '[ Profile 10 MB hard drive ]'
  391. ID03        str      '[ Apple 3.5 drive ]'
  392. ID04        str      '[ SCSI ]'
  393. ID05        str      '[ SCSI hard disk ]'
  394. ID06        str      '[ SCSI tape drive ]'
  395. ID07        str      '[ SCSI CD ROM ]'
  396. ID08        str      '[ SCSI printer ]'
  397. ID09        str      '[ Serial modem ]'
  398. ID10        str      '[ Console driver ]'
  399. ID11        str      '[ Serial printer ]'
  400. ID12        str      '[ Serial LaserWriter ]'
  401. ID13        str      '[ AppleTalk LaserWriter ]'
  402. ID14        str      '[ RAM disk ]'
  403. ID15        str      '[ ROM disk ]'
  404. ID16        str      '[ File server ]'
  405. ID17        str      '[ Reserved ]'
  406. ID18        str      '[ AppleDesktop bus ]'
  407. ID19        str      '[ Generic hard disk ]'
  408. ID20        str      '[ Generic floppy disk ]'
  409. ID21        str      '[ Generic tape drive ]'
  410. ID22        str      '[ Generic char device driver ]'
  411. ID23        str      '[ MFM-encoded disk drive ]'
  412. ID24        str      '[ Generic AppleTalk network ]'
  413. ID25        str      '[ Sequential access device ]'
  414. ID26        str      '[ SCSI scanner ]'
  415. ID27        str      '[ Other scanner ]'
  416. ID28        str      '[ LaserWriter SC ]'
  417. ID29        str      '[ AppleTalk main driver ]'
  418. ID30        str      '[ AppleTalk file server ]'
  419. ID31        str      '[ AppleTalk RPM driver ]'
  420.  
  421. DevIDPtrTbl anop     ;table of ptrs to device ID number definitions
  422.             dc       a4'ID00,ID01,ID02,ID03,ID04,ID05,ID06,ID07'
  423.             dc       a4'ID08,ID09,ID10,ID11,ID12,ID13,ID14,ID15'
  424.             dc       a4'ID16,ID17,ID18,ID19,ID20,ID21,ID22,ID23'
  425.             dc       a4'ID24,ID25,ID26,ID27,ID28,ID29,ID30,ID31'
  426.             end
  427.  
  428. *****************************************************************
  429. *
  430. SetWindSize start
  431. *
  432. * Calculate window size:
  433. *
  434. *****************************************************************
  435.             using    Globals
  436.  
  437.             stz      EntryWidT1      ;zero variables
  438.             stz      EntryWidT2
  439.             stz      XSave
  440.             stz      EntryNum
  441.  
  442. SW01        ldx      XSave           ;get index to table entries
  443.             lda      DevNameTbl,x    ;get length byte in device name table
  444.             beq      SW06            ;no more table entries
  445.             inc      EntryNum        ;bump entry counter
  446.  
  447.             ldy      #^DevNameTbl    ;get width of device name table entry
  448.             clc
  449.             txa
  450.             adc      #DevNameTbl
  451.             tax
  452.             bcc      SW02
  453.             iny
  454. SW02        pha
  455.             phy
  456.             phx
  457.             _StringWidth
  458.             pla
  459.  
  460.             cmp      EntryWidT1      ;save widest string in device name table
  461.             bcc      SW03
  462.             sta      EntryWidT1
  463.  
  464. SW03        ldy      #^DevInfoTbl    ;get width of device info table entry
  465.             clc
  466.             lda      XSave
  467.             adc      #DevInfoTbl
  468.             tax
  469.             bcc      SW04
  470.             iny
  471. SW04        pha
  472.             phy
  473.             phx
  474.             _StringWidth
  475.             pla
  476.  
  477.             cmp      EntryWidT2      ;save widest string in device info table
  478.             bcc      SW05
  479.             sta      EntryWidT2
  480.  
  481. SW05        clc                      ;bump index to next table entries
  482.             lda      XSave
  483.             adc      #32
  484.             sta      XSave
  485.             bra      SW01
  486.  
  487. SW06        lda      #30+5+5         ;set bottom window coordinate
  488.             clc                      ; (30=top, 5=top and bottom margins)
  489. SW07        adc      #9              ; (9=pixels per row)
  490.             dec      EntryNum
  491.             bne      SW07
  492.             sta      wSize+4
  493.  
  494.             clc                      ;set right window coordinate
  495.             lda      EntryWidT1      ; and start of 2nd column
  496.             adc      #30*2           ; (30=margins and space between columns)
  497.             sta      Col2Left
  498.             adc      EntryWidT2
  499.             adc      #30
  500.             sta      wSize+6
  501.             rts
  502. ;................................................................
  503. ;
  504. ; SetWindSize data:
  505. ;
  506. EntryWidT1  ds       2               ;widest entry in device name table
  507. EntryWidT2  ds       2               ;widest entry in device info table
  508. EntryNum    ds       2               ;number of table entries
  509.             end
  510.  
  511. *****************************************************************
  512. *
  513. ShowDevices start
  514. *
  515. * Display device information:
  516. *
  517. *****************************************************************
  518.             using    Globals
  519.  
  520.             _GetPrefixGS PfxParm     ;get current prefix zero
  521.             bcc      SD01            ;no error
  522.             dc       h'00'           ;crash (should never come here)
  523.  
  524. SD01        lda      #5              ;leave 5-pixel space on top of window
  525.             sta      v
  526.             stz      XSave           ;zero table index save location
  527.  
  528. SD02        ldx      XSave           ;get index to table entry
  529.             lda      DevNameTbl,x    ;get length byte of P-string in table
  530.             and      #$FF
  531.             bne      SD03            ;more table entries
  532.             rts                      ;no more table entries so exit
  533.  
  534. SD03        clc                      ;bump vertical coordinate to next line
  535.             lda      v               ; (9=pixels per line)
  536.             adc      #9
  537.             sta      v
  538.  
  539.             PushWord CheckPosn       ;move pen to check mark position
  540.             PushWord v
  541.             _MoveTo
  542.  
  543.             jsl      CheckCurDev     ;check for currently active device
  544.             bcc      SD04            ;present entry is active device
  545.  
  546.             PushWord #$20            ;place space in front of entry if
  547.             bra      SD05            ; it represents inactive device
  548.  
  549. SD04        PushWord #$12            ;check active device
  550. SD05        _DrawChar
  551.  
  552.             PushWord #$20            ;it takes 2 spaces to wipe
  553.             _DrawChar                ; out 1 check mark
  554.  
  555.             PushWord Col1Left        ;move pen to 1st column coordinates
  556.             PushWord v
  557.             _MoveTo
  558.  
  559.             ldy      #^DevNameTbl    ;display name of device
  560.             clc
  561.             lda      XSave
  562.             adc      #DevNameTbl
  563.             phy
  564.             pha
  565.             _DrawString
  566.  
  567.             PushWord Col2Left        ;move pen to 2nd column coordinates
  568.             PushWord v
  569.             _MoveTo
  570.  
  571.             ldy      #^DevInfoTbl    ;display pathname or device description
  572.             clc
  573.             lda      XSave
  574.             adc      #DevInfoTbl
  575.             phy
  576.             pha
  577.             _DrawString
  578.  
  579.             clc                      ;set index to next table entry
  580.             lda      XSave
  581.             adc      #32
  582.             sta      XSave
  583.             brl      SD02            ;loop back for another entry
  584. ;................................................................
  585. ;
  586. ; Check for currently active device:
  587. ;
  588. ; Exit: carry clear = active device, carry set = inactive device.
  589. ;
  590. CheckCurDev ldx      XSave
  591.             lda      DevInfoTbl,x    ;match volume name of block device with
  592.             and      #$FF            ; volume name of current prefix
  593.             tay                      ;   -index GetPrefix buffer
  594.             clc
  595.             adc      XSave
  596.             tax                      ;   -index device info table
  597.             shortm
  598.             lda      pfxNameStr+2,y
  599.             cmp      #':'
  600.             bne      NotCurDev
  601. CCD01       dex
  602.             dey
  603.             beq      GotCurDev
  604.             lda      pfxNameStr+2,y
  605.             cmp      #$60            ;   -ensure upper case comparisons
  606.             bcc      CCD02
  607.             and      #$DF
  608. CCD02       cmp      DevInfoTbl+1,x
  609.             beq      CCD01
  610.  
  611. NotCurDev   longm                    ;no match means that present table entry
  612.             sec                      ; is not the currently active device
  613.             rtl
  614.  
  615. GotCurDev   longm                    ;match means that present table entry
  616.             clc                      ; is the currently active device
  617.             rtl
  618. ;................................................................
  619. ;
  620. ; ShowDevices data:
  621. ;
  622. v           ds       2               ;vertical drawing position
  623.             end
  624.  
  625. *****************************************************************
  626. *
  627. Globals     data
  628. *
  629. * Global data:
  630. *
  631. *****************************************************************
  632.  
  633. OpenFlag    ds       2               ;open flag: NE=open, EQ=closed
  634. WindowPtr   ds       4               ;ptr to NDA window's GrafPort
  635. XSave       ds       2               ;value of table entry index
  636. CheckPosn   dc       i2'15'          ;position of check mark (active device)
  637. Col1Left    dc       i2'30'          ;left margin of column 1
  638. Col2Left    ds       2               ;left margin of column 2
  639.  
  640. DevNameTbl  anop                     ;device name table
  641.             ds       32*16+2         ;max name size=32 bytes, max entries=16
  642.  
  643. DevInfoTbl  anop                     ;device pathname/description table
  644.             ds       32*16           ;max entry size=32 bytes, max entries=16
  645.  
  646. WindowRec   anop                     ;parameter list for NDA window
  647.             dc       i2'wRecEnd-WindowRec' ;byte size of table
  648.             dc       i2'%1100000010100000' ;description of window frame
  649.             dc       i4'wTitle'      ;ptr to title string
  650.             dc       i4'0'           ;reference constant
  651.             dc       i2'0,0,0,0'     ;zoom size
  652.             dc       i4'wColorTable' ;ptr to color table
  653.             dc       i2'0,0'         ;offset of content area from data area
  654.             dc       i2'0,0'         ;height and width of data area
  655.             dc       i2'0,0'         ;grow height and width
  656.             dc       i2'0,0'         ;arrow scroll vert and horiz
  657.             dc       i2'0,0'         ;page scroll vert and horiz
  658.             dc       i4'0'           ;info bar reference constant
  659.             dc       i2'0'           ;info bar height
  660.             dc       i4'0'           ;ptr to frame definition procedure
  661.             dc       i4'0'           ;ptr to info bar defProc
  662.             dc       i4'0'           ;ptr to content update defProc
  663. wSize       dc       i2'30,20,170,600'     ;coordinates of window (T,L,B,R)
  664.             dc       i4'-1'          ;plane (front)
  665.             dc       i4'0'           ;ptr to memory (handled by Memory Mgr)
  666. wRecEnd     anop
  667.  
  668. wTitle      str      ' System Devices '
  669.  
  670. wColorTable anop                     ;color table for NDA window
  671.             dc       i2'$0000'       ;frame
  672.             dc       i2'$0F0F'       ;title string and inactive title bar
  673.             dc       i2'$0144'       ;active title bar
  674.             dc       i2'$0000'       ;grow box and alert's middle outline
  675.             dc       i2'$0000'       ;info bar and alert's inside outline
  676.  
  677. PfxParm     anop                     ;GetPrefix parameter list (GS/OS class 1)
  678.             dc       i2'2'           ;pCount = 2
  679.             dc       i2'0'           ;prefix number zero
  680.             dc       i4'pfxBuf'      ;ptr to prefix result buffer
  681.  
  682. DInfoParm   anop                     ;DInfo parameter list (GS/OS class 1)
  683.             dc       i2'8'           ;pCount = 8
  684. devNum      dc       i2'0'           ;device number
  685.             dc       i4'devNameBuf'  ;ptr to device name result buffer
  686. charistics  dc       i2'0'           ;characteristics of device
  687.             dc       i4'0'           ;total blocks on block device
  688.             dc       i2'0'           ;slot number
  689.             dc       i2'0'           ;unit number
  690.             dc       i2'0'           ;version of device driver
  691. devID       dc       i2'0'           ;device ID
  692.  
  693. VolumeParm  anop                     ;Volume parameter list (GS/OS class 1)
  694.             dc       i2'2'           ;pCount = 2
  695.             dc       i4'devNameStr'  ;device name input string
  696.             dc       i4'volNameBuf'  ;ptr to volume name result buffer
  697.  
  698. devNameBuf  anop                     ;device name result buffer
  699.             dc       i2'35'          ;buffer size word
  700. devNameStr  ds       2+31            ;string length word + name chars
  701.  
  702. volNameBuf  anop                     ;volume name result buffer
  703.             dc       i2'21'          ;buffer size word
  704. volNameStr  ds       2+17            ;string length word + name chars
  705.  
  706. pfxBuf      anop                     ;prefix zero result buffer
  707.             dc       i2'70'          ;buffer size word
  708. pfxNameStr  ds       2+66            ;string length word + name chars
  709.             end
  710.